﻿using System;

namespace WebCommon.Com
{
    public static class DateTime2
    {
        public static  string ToyyyyMMddHHmm(this DateTime date)
        {
            
            return date.ToString("yyyyMMddHHmm");
        }

        public static  string Toyyyy_MM_dd_HH_mm(this DateTime date)
        { 
            return date.ToString("yyyy-MM-dd HH:mm"); ;
        }

        public static  string ToyyyyMMddHHmmss(this DateTime date)
        { 
            return date.ToString("yyyyMMddHHmmss"); ;
        }
        public static  string ToyyyyMMddHHmm(this DateTime date)
        { 
            return date.ToString("yyyyMMddHHmm"); ;
        }
    }
}